
let mongoose = require('mongoose');

mongoose.connect('mongodb://127.0.0.1:27017/manage', {useNewUrlParser: true,useUnifiedTopology: true, useCreateIndex: true, useFindAndModify: false})

mongoose.connection.once("open", function(){
	console.log('已打开服务器')
})
mongoose.connection.once("close", function(){
	console.log('正在关闭')
})
mongoose.connection.once("error", function(){
	console.log('出错')
})

module.exports = mongoose;